package com.yxx.common.base.impl;

import java.io.Serializable;
import java.util.List;

import com.yxx.common.base.BaseMapper;
import com.yxx.common.base.BaseService;

public abstract class BaseServiceImpl<T,ID extends Serializable> implements BaseService<T,Long> {

	public abstract BaseMapper<T> mapper();

	public void insert(T entity) {
		mapper().insert(entity);
	}

	public void deleteByPrimaryKey(Serializable id) {
		mapper().deleteByPrimaryKey(id);
	}

	public void updateByPrimaryKey(T entity) {
		mapper().updateByPrimaryKey(entity);
	}

	public T selectByPrimaryKey(Serializable id) {
		return mapper().selectByPrimaryKey(id);
	}

	public List<T> selectAll() {
		return mapper().selectAll();
	}
 

}
